<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <title>新增整改工单</title>
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui-pull-refresh.css" />
    <link rel="stylesheet" type="text/css" href="../css/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="css/form.css" />
    <link rel="stylesheet" type="text/css" href="css/comm.css" />
    <link rel="stylesheet" type="text/css" href="css/plantasklist.css" />
    <link rel="stylesheet" type="text/css" href="css/plandevicetaskdetail.css" />
    <link rel="stylesheet" type="text/css" href="css/qualitycontrol.css" />
    <link rel="stylesheet" type="text/css" href="css/form.css" />
    <link rel="stylesheet" type="text/css" href="css/editStyle.css" />
    <link rel="stylesheet" type="text/css" href="../script/mui/mui.picker.min.css" />
    <link rel="stylesheet" type="text/css" href="../script/mui/mui.reset.css" />
    <style>
        .mb10 {
            margin-bottom: 10px !important;
        }

        .new-formcontent {
            width: 100%;
            padding: 0;
        }
        .imglist_box {
            overflow: hidden;
        }

        select.choose {
            width: auto !important;
            float: right;
            text-align: right !important;
        }
        .aui_formtitle{
            min-width: 6rem;
        }
    </style>
</head>

<body>
    <div id="app" v-cloak>
        <div class="mask_bg" v-on:click="doCloseRoom()" v-if="IsRoomOpen"></div>
        <div class="mask_bg" v-on:click="doCloseCheckUser()" v-if="IsCheckUser"></div>
        <div class="mask_bg" v-on:click="doCloseSendUser()" v-if="IsSendUser"></div>
        <div class="mask_bg" v-on:click="doCloseCheckType()" v-if="IsCheckType"></div>  
        <div class="choose_box" v-if="IsRoomOpen">
            <div class="choose_room_title">
                <div class="choose_room_title">选择问题分类</div>
            </div>
            <div class="choose_room_content">
                <div v-on:click="doSelectRoom(item)"  class="choose_room_item"  v-for="item in CategoryList" v-bind:class="{'selected':newform.CategoryID==item.ID}" >
                    <label>{{item.CategoryName}}</label><i  v-bind:class="{'selected':newform.CategoryID==item.ID}" class="icon iconfont icon-xuanze"></i>
                </div>
            </div>
        </div>
        <div class="choose_box" v-if="IsCheckUser">
            <div class="choose_room_title">
                <div class="choose_room_title">选择验收人</div>
            </div>
            <div class="choose_room_content">
                <div v-on:click="doSelectCheckUser(item)"  class="choose_room_item"  v-for="item in CheckUserList" v-bind:class="{'selected':newform.CheckUserIDs.indexOf(item.UserID)>-1}" >
                    <label>{{item.UserName}}</label><i  v-bind:class="{'selected':newform.CheckUserIDs.indexOf(item.UserID)>-1}" class="icon iconfont icon-xuanze"></i>
                </div>
            </div>
        </div>
        <div class="choose_box" v-if="IsSendUser">
            <div class="choose_room_title">
                <div class="choose_room_title">选择抄送人</div>
            </div>
            <div class="choose_room_content">
                <div v-on:click="doSelectSendUser(item)"  class="choose_room_item"  v-for="item in SendUserList" v-bind:class="{'selected':newform.SendUserIDs.indexOf(item.UserID)>-1}" >
                    <label>{{item.UserName}}</label><i  v-bind:class="{'selected':newform.SendUserIDs.indexOf(item.UserID)>-1}" class="icon iconfont icon-xuanze"></i>
                </div>
            </div>
        </div>
        <div class="choose_box" v-if="IsCheckType">
            <div class="choose_room_title">
                <div class="choose_room_title">选择检查类型</div>
            </div>
            <div class="choose_room_content">
                <div v-on:click="doSelectCheckType(item)"  class="choose_room_item"  v-for="item in CheckTypeList" v-bind:class="{'selected':newform.CheckType==item.ID}" >
                    <label>{{item.Name}}</label><i  v-bind:class="{'selected':newform.CheckType==item.ID}" class="icon iconfont icon-xuanze"></i>
                </div>
            </div>
        </div>
        <div class="boxarea edit " style="margin-bottom: 4.5rem; overflow: hidden;">
            <div class="work_title new_work_title ">
                问题描述
            </div>
            <div class="">
                <div class="aui_formitem">
                    <div class="aui_formtitle">所属项目<img class="col-star" src="../image/redstar.png"></div>
                    <div v-if="ProjectID>0&&newform.RelatedID>0" class="aui_formcontent">
                        <input class="choose" v-model="newform.ProjectName" readonly="readonly" type="text" placeholder="请选择">
                        <i class="icon iconfont icon-xiangyoujiantou"></i>
                    </div>
                    <div v-else class="aui_formcontent">
                        <input class="choose" id="chooseproject" v-model="newform.ProjectName" readonly="readonly" type="text"
                            placeholder="请选择">
                        <i class="icon iconfont icon-xiangyoujiantou"></i>
                    </div>
                </div>
                <div class="aui_formitem">
                    <div class="aui_formtitle">问题分类<img class="col-star" src="../image/redstar.png"></div>
                    <div class="aui_formcontent" v-on:click="do_openQuestion(newform.CategoryID)">
                        <input class="choose" id="choosecategory" v-model="newform.CategoryName" readonly="readonly" type="text" placeholder="请选择">
                        <i class="icon iconfont icon-xiangyoujiantou"></i>
                    </div>
                </div>
                <div class="aui_formitem width6">
                    <div class="aui_formtitle">需求完成时间<img class="col-star" src="../image/redstar.png"></div>
                    <div  class="aui_formcontent">
                        <span class="choose new-span-input" id="choosedatetime" data-options='{"type":"datetime"}' v-bind:class="{'textColorPlaceholder':newform.ServiceEndTime==''}">{{newform.ServiceEndTime==''?'请选择':newform.ServiceEndTime}}</span>
                        <i class="icon iconfont icon-xiangyoujiantou"></i>
                    </div>
                </div>
                <div class="aui_formitem">
                    <div class="aui_formtitle">责任部门</div>
                    <div class="aui_formcontent" v-on:click="doOpenResDepartment()">
                        <input class="choose" readonly="readonly" type="text" placeholder="请选择" v-model="newform.ResDepartmentName">
                        <i class="icon iconfont icon-xiangyoujiantou"></i>
                    </div>
                    <!-- <div class="aui_formcontent" v-on:click="do_openResDepartment(newform.ResDepartmentID)">
                        <input class="choose" id="choosecategory" v-model="newform.ResDepartmentName" readonly="readonly" type="text" placeholder="请选择">
                        <i class="icon iconfont icon-xiangyoujiantou"></i>
                    </div> -->
                </div>
                <div class="aui_formitem">
                    <div class="aui_formtitle">整改处理人<img class="col-star" src="../image/redstar.png"></div>
                    <div v-on:click="do_choose_user(1)" class="aui_formcontent">
                        <input class="choose" v-model="newform.UserName" readonly="readonly" type="text" placeholder="请选择">
                        <i class="icon iconfont icon-xiangyoujiantou"></i>
                    </div>
                </div>
                <div class="aui_formitem" style="display: block;">
                    <div class="formitem_line">
                        <div  class="aui_formtitle ">验收人<img class="col-star" src="../image/redstar.png"></div>
                        <div v-on:click="doOpenCheckUser()" class="aui_formcontent">
                            <input class="choose" v-model="newform.CheckUserName" readonly="readonly" type="text" placeholder="请选择">
                            <i class="icon iconfont icon-xiangyoujiantou"></i>
                        </div>
                    </div>
                    <div class="ysperson">整改完成后，会自动推送验收任务至验收人</div>
                </div>
                <div class="aui_formitem" style="display: block;">
                    <div class="formitem_line">
                        <div  class="aui_formtitle ">抄送人</div>
                        <div v-on:click="doOpenSendUser()" class="aui_formcontent">
                            <input class="choose" v-model="newform.SendUserName" readonly="readonly" type="text" placeholder="请选择">
                            <i class="icon iconfont icon-xiangyoujiantou"></i>
                        </div>
                    </div>
                    <div class="ysperson">整改任务会推送给予抄送人，抄送人仅支持进行查看。</div>
                </div>
                <!-- //检查类型 -->
                <div class="aui_formitem">
                    <div class="aui_formtitle">检查类型</div>
                    <div class="aui_formcontent" v-on:click="doOpenCheckType(newform.CheckType)">
                        <input class="choose" id="choosecategory" v-model="newform.CheckTypeDesc" readonly="readonly" type="text" placeholder="请选择">
                        <i class="icon iconfont icon-xiangyoujiantou"></i>
                    </div>
                </div>    
                <div class="aui_formitem" style="display: block;">
                    <div class="formitem_line">
                        <div  class="aui_formtitle ">扣分值</div>
                        <div class="aui_formcontent">
                            <input  v-model="newform.DeductNumber" type="number">
                        </div>
                    </div>
                </div>
                <div class="aui_formitem border-bottom0">
                    <div class="aui_formitem block border-bottom0 new-formcontent ">
                        <div class="aui_formtitle">问题描述<img class="col-star" src="../image/redstar.png"></div>
                        <div class="aui_formcontent" style="padding-left: 0px;">
                            <textarea placeholder="请填写详细的待整改问题(必填)" v-model="newform.ServiceContent" style="height: 4rem;"></textarea>
                        </div>
                    </div>

                </div>
                <div class="imglist_box" style="padding-top: 30px;">
                    <div v-if="ID>0" class="imglist_item" v-for="(item,index) in imgEditlist">
                        <img v-on:click="do_viewimages(index,2)" class="imgitem ml4" v-bind:src="item.imgurl" />
                        <img v-on:click="remove_img(index,2,item.ID)" class="onmouse_close" src="../image/close_mouseover.svg" />
                    </div>
                    <div class="imglist_item" v-for="(item,index) in imglist">
                        <img v-on:click="do_viewimages(index,1)" class="imgitem ml4" v-bind:src="item.url" />
                        <img v-on:click="remove_img(index,1)" class="onmouse_close" src="../image/close_mouseover.svg" />
                    </div>
                    <div v-if="imglist.length<maxuploadcount" class="imglist_item ml4">
                        <div class="img_plusbox">
                            <img v-on:click="choose_picture()" src="../image/photo_image.svg" />
                        </div>
                        最多支持{{maxuploadcount}}张
                    </div>
                </div>

            </div>
        </div>

        <!-- <div class="aui_bottom">
            <div class="aui_bottombtn" v-on:click="do_saveEdit()">保存修改</div>
        </div> -->
        <div class="aui_bottom">
            <div class="aui_bottombtn" v-on:click="do_save()">提交</div>
        </div>
    </div>
</body>
<script type="text/javascript " src="../script/api.js "></script>
<script type="text/javascript " src="../script/vue.js "></script>
<script type="text/javascript" src="../script/config.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/mui/mui.min.js"></script>
<script type="text/javascript" src="../script/mui/mui.picker.min.js"></script>
<script type="text/javascript" src="../script/mui/mui.poppicker.js"></script>
<script type="text/javascript" src="../script/aui-toast.js"></script>
<script type="text/javascript" src="../script/aui-tab.js"></script>
<script type="text/javascript" src="../script/aui-pull-refresh.js"></script>
<script type="text/javascript" src="../script/aui-scroll.js"></script>
<script type="text/javascript" src="../script/aui-popup.js"></script>
<script type="text/javascript " src="../script/moment/moment.js"></script>
<script type="text/javascript " src="js/qualitycontrol.js"></script>

</html>
